﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ESupervision.Models
{
    public class MeetingEvent
    {

        public int MeetingEventID { get; set; }


        public MeetingEventStatus Status { get; set; }

        [Required]
        [MaxLength(1000)]
        public string Subject { get; set; }

        [Required]
        [MaxLength(4000)]
        public string Body { get; set; }

        [Required]
        public string OrganizerUserID { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "Start Time")]
        public DateTime StartTime { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "End Time")]
        public DateTime EndTime { get; set; }

        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "Alert Time")]
        public DateTime AlertTime { get; set; }

        [ForeignKey("OrganizerUserID")]
        public virtual ApplicationUser OrganizerUser { get; set; }


        [InverseProperty("MeetingEvent")]
        public virtual ICollection<MeetingEventParticipant> Participants { get; set; }

        [InverseProperty("MeetingEvent")]
        public virtual ICollection<MeetingNote> MeetingNotes { get; set; }



    }
}